package com.countryside.mapper;

import com.countryside.pojo.EmployeeProject;
import com.github.pagehelper.IPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface EmployeeProjectMapper {


    /**
     * 添加个人项目经验
     * @param employeeProject
     * @return
     */
    int addEmployeeProject(EmployeeProject employeeProject);

    /**
     * 通过用户id遍历出其项目经验
     * @param userId
     * @return
     */
    List<EmployeeProject> getEmployeeProjectByUserId(@Param("userId") String userId);

    /**
     * 修改个人项目
     * @param employeeProject
     * @return
     */
    int updateEmployeeProject(EmployeeProject employeeProject);

    /**
     * 删除项目信息
     * @param id
     * @return
     */
    int deleteEmployeeProject(@Param("id") int id);

    /**
     * 根据用户ID查找用户项目经验
     * @param userId
     * @return
     */
    List<EmployeeProject> queryEmployeeProjectByUserId(@Param("userId") String userId);
}
